<template>
  <div>
    <div class="nav">
      <van-icon
      @click="back()"
        name="arrow-left"
        size="26"
        color="#999"
        style="margin: 10px; float: left"
      />
      <span class="center" v-text="center"></span>
      <span class="right" v-text="right" @click="skip()"></span>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import { Icon } from "vant";
Vue.use(Icon);
export default {
  props: ["center", "right","skip"],
  data() {
    return {
    };
  },
  methods:{
      back(){
          this.$router.go(-1)
      }
  }
};
</script>

<style scoped>
.center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  line-height: 50px;
  color: #999;
}
.right {
  float: right;
  line-height: 50px;
  margin-right: 20px;
}
.nav{
    position: fixed;
    top: 0;
    width: 100%;
    background-color: white;
}
</style>
